#include "cheetah/graphics/material.h"
#include <string.h>

namespace cheetah {
namespace graphics {
Material::Material(const float *Kd, const float *Ka, const float *Ks,
                   const float shininess) : shininess_(shininess) {
  if (NULL != Kd) memcpy(Kd_, Kd, sizeof(Kd_));
  if (NULL != Ka) memcpy(Ka_, Ka, sizeof(Ka_));
  if (NULL != Ks) memcpy(Ks_, Ks, sizeof(Ks_));
}
Material::Material(const Material &mat) {
  *this = mat;
}
Material &Material::operator=(const Material &mat) {
  memcpy(data_, mat.data_, sizeof(data_));
  return *this;
}
Material::Material(const float *mat_data) {
  if (NULL != mat_data) memcpy(data_, mat_data, sizeof(data_));
}
} // graphics
} // cheetah